import os

# file_dir = "C:\\Users\\jiangshan\\Desktop\\Lock3DFace-demo\\color"
# img_list = []
# for root, dirs, files in os.walk(file_dir):
#     if files:
#         for file in files:
#             img_list.append(root + "\\" + file)
# print(img_list)

filename = input()

name1, name2 = filename.split('.')
print(name1)
label1, _, label2, label3 = name1.split('_')
print(label1, label2, label3)